<!DOCTYPE html>
<html lang="en" xmlns:th=http://www.thymeleaf.org xmlns:shiro=http://www.pollix.at/thymeleaf/shiro>
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" th:href="@{/css/admin.css}"/>
    <link rel="stylesheet" th:href="@{/css/bootstrap.min.css}"/>
    <link rel="stylesheet" th:href="@{/css/dashboard.css}"/>
    <script type="text/javascript" src="/js/jq.js"></script>
</head>

<body>
<div>
    <div class="fan">
        <a th:href="@{/}"><span><</span> 返回首页</a>
        <!--<a th:href="@{/loginout}" class="zhu" sh>注销</a>-->

    </div>

    <div class="ding">
        <p>管理中心</p>
        <hr/>

        <div class="ding2">
            <div class="xuan">
                <a href="#" id="a1">用户管理</a>
                <a href="#" id="a2">房间信息</a>
                <a href="#" id="a3">房间管理</a>
                <a href="#" id="a4">订单管理</a>
            </div>
            <div class="nei" id="d1">
                <div class="container-fluid">
                    <div class="row">



                        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">

                            <h2><a class="btn btn-sm btn-outline-dark btn-light" th:href="@{/insertUu}">添加用户</a></h2>

                            <div class="table-responsive">
                                <table class="table table-striped table-sm">
                                    <thead>
                                    <tr>
                                        <th>id</th>
                                        <th>用户名</th>
                                        <th>密码</th>
                                        <th>权限</th>

                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="uu:${u}">
                                        <td th:text="${uu.getId()}">uu</td>
                                        <td th:text="${uu.getName()}">uu</td>
                                        <td th:text="${uu.getPassword()}">uu</td>
                                        <td th:text="${uu.getPerms()}">uu</td>

                                        <td>

                                            <a class="btn btn-sm btn-primary" th:href="@{/selectUU/}+${uu.getId()}">编辑</a>
                                            <a class="btn btn-sm btn-danger" th:href="@{/deletU/}+${uu.getId()}">删除</a>

                                        </td>
                                    </tr>

                                    </tbody>
                                </table>
                            </div>
                        </main>
                    </div>
                </div>
            </div>
            <div class="nei2 nei" hidden="false" id="d2">
                <div class="container-fluid">
                    <div class="row">



                        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">

                            <h2><a class="btn btn-sm btn-outline-dark btn-light" th:href="@{/insertRR}">添加房间</a></h2>

                            <div class="table-responsive">
                                <table class="table table-striped table-sm tb">
                                    <thead>
                                    <tr>
                                        <th>id</th>
                                        <th>房间名称</th>
                                        <th>房间数量</th>
                                        <th>titl</th>
                                        <th>titll</th>
                                        <th>图片</th>
                                        <th>价格</th>
                                        <th>面积</th>
                                        <th th:width="300px">楼层</th>
                                        <th>s</th>
                                        <th>ss</th>
                                        <th>sss</th>



                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="rr:${r}">
                                        <td th:text="${rr.getId()}">uu</td>
                                        <td th:text="${rr.getRoomname()}">uu</td>
                                        <td th:text="${rr.getNum()}">uu</td>
                                        <td th:text="${rr.getTitl()}">uu</td>
                                        <td th:text="${rr.getTitll()}">uuuuuuuuuuuuuu</td>
                                        <td th:text="${rr.getImg()}">uu</td>
                                        <td th:text="${rr.getPrice()}">uu</td>
                                        <td th:text="${rr.getMianji()}">uu</td>
                                        <td th:text="${rr.getLou()}"></td>
                                        <td th:text="${rr.getS()}">uuuuu</td>
                                        <td th:text="${rr.getSs()}">uuuuuuuuuuuuuuu</td>
                                        <td th:text="${rr.getSss()}">uuuuuuuuuuuuuuu</td>

                                        <td>

                                            <a class="btn btn-sm btn-primary" th:href="@{/selectRRr/}+${rr.getId()}">编辑</a>
                                            <a class="btn btn-sm btn-danger"  th:href="@{/deletR/}+${rr.getId()}">删除</a>

                                        </td>
                                    </tr>


                                    </tbody>
                                </table>
                            </div>
                        </main>
                    </div>
                </div>
            </div>
            <div class="nei3 nei" hidden="false" id="d3">
                <div class="container-fluid">
                    <div class="row">



                        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">



                            <h2><a class="btn btn-sm btn-outline-dark btn-light" th:href="@{/insertFf}">添加房间</a></h2>
                            <div class="table-responsive">
                                <table class="table table-striped table-sm">
                                    <thead>
                                    <tr >
                                        <th>id</th>
                                        <th >房间号</th>
                                        <th >入住日期</th>
                                        <th >退房日期</th>
                                        <th>入住天数</th>
                                        <th>总价格</th>
                                        <th>状态</th>
                                        <th>房间id</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="ff:${f}" >
                                        <td th:text="${ff.getId()}">uu</td>
                                        <td th:text="${ff.getFh()}">uu</td>
                                        <td th:text="${ff.getRu()}">uu</td>
                                        <td th:text="${ff.getTui()}">uu</td>
                                        <td th:text="${ff.getDay()}">uu</td>
                                        <td th:text="${ff.getPri()}" >uu</td>
                                        <td th:text="${ff.getState()}">uu</td>
                                        <td th:text="${ff.getRid()}">uu</td>


                                        <td>

                                           <!-- <a class="btn btn-sm btn-primary" >编辑</a>-->
                                            <a class="btn btn-sm btn-danger" th:href="@{/deletF/}+${ff.getId()}">删除</a>

                                        </td>
                                    </tr>

                                    </tbody>
                                </table>
                                <!--    <h3>当房间状态时为0时，表示该房间可预订。当房间状态为1时，表示该房间已被预定，请将该房间删除，再根据订单管理中信息将房间添加回来</h3>-->

                                <h5>当房间状态时为0时，表示该房间可预订。</h5>
                                <h5>当房间状态为1时，表示该房间已被预定，请将该房间删除，再根据订单管理中的信息将房间添加回来</h5>
                            </div>
                        </main>
                    </div>
                </div>

            </div>

            <div class="nei4 nei" hidden="false" id="d4">
                <div class="container-fluid">
                    <div class="row">



                        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">



                            <div class="table-responsive">
                                <table class="table table-striped table-sm">
                                    <thead>
                                    <tr>
                                        <th>id</th>
                                        <th>房间号</th>
                                        <th>入住日期</th>
                                        <th>退房日期</th>
                                        <th>入住天数</th>
                                        <th>总价格</th>
                                        <th>房间名称</th>
                                        <th>用户id</th>
                                        <th>操作</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr th:each="dd:${d}">
                                        <td th:text="${dd.getId()}">uu</td>
                                        <td th:text="${dd.getDanf()}">uu</td>
                                        <td th:text="${dd.getRu()}">uu</td>
                                        <td th:text="${dd.getTui()}">uu</td>
                                        <td th:text="${dd.getDay()}">uu</td>
                                        <td th:text="${dd.getPri()}">uu</td>
                                        <td th:text="${dd.getRooname()}">uu</td>
                                        <td th:text="${dd.getUid()}">uu</td>

                                        <td>


                                            <a class="btn btn-sm btn-danger" th:href="@{/deletD/}+${dd.getId()}" id="bt4">删除</a>

                                        </td>
                                    </tr>

                                    </tbody>
                                </table>
                            </div>
                        </main>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div><script>
    $(function () {
        $("#a1").css('background-color','#ffffff');
        $("#a1").css('color','#282727');

        $("#a1").click(function () {
            $("#d1").prop("hidden",false);
            $("#d2").prop("hidden",true);
            $("#d3").prop("hidden",true);
            $("#a1").css('background-color','#ffffff');
            $("#a1").css('color','#282727');
            $("#a2").css('color','')
            $("#a2").css('background-color','')
            $("#a3").css('color','')
            $("#a3").css('background-color','')
            $("#a4").css('color','')
            $("#a4").css('background-color','')
        })
        $("#a2").click(function () {
            $("#d1").prop("hidden",true);
            $("#d4").prop("hidden",true);
            $("#d3").prop("hidden",true);
            $("#d2").prop("hidden",false);
            $("#a2").css('background-color','#fffcfc')
            $("#a1").css('color','')
            $("#a2").css('color','#312f2f')
            $("#a1").css('background-color','')
            $("#a3").css('color','')
            $("#a3").css('background-color','')
            $("#a4").css('color','')
            $("#a4").css('background-color','')
        })
        $("#a3").click(function () {
            $("#d1").prop("hidden",true);
            $("#d4").prop("hidden",true);
            $("#d2").prop("hidden",true);
            $("#d3").prop("hidden",false);
            $("#a2").css('color','')
            $("#a2").css('background-color','')
            $("#a1").css('color','')
            $("#a1").css('background-color','')
            $("#a3").css('background-color','#ffffff');
            $("#a3").css('color','#282727');
            $("#a4").css('color','')
            $("#a4").css('background-color','')
        })
        $("#a4").click(function () {
            $("#d4").prop("hidden",false);
            $("#d2").prop("hidden",true);
            $("#d3").prop("hidden",true);
            $("#d1").prop("hidden",true);
            $("#a4").css('background-color','#ffffff');
            $("#a4").css('color','#282727');
            $("#a2").css('color','')
            $("#a2").css('background-color','')
            $("#a3").css('color','')
            $("#a3").css('background-color','')
            $("#a1").css('color','')
            $("#a1").css('background-color','')
        })
        $("#bt4").click(function () {
            $("#d4").prop("hidden",false);
            $("#d2").prop("hidden",true);
            $("#d3").prop("hidden",true);
            $("#d1").prop("hidden",true);
        })

    })
</script>

</body>

</html>